package com.sky.seata.account.service.impl;

import com.sky.seata.account.entity.Account;
import com.sky.seata.account.mapper.AccountMapper;
import com.sky.seata.account.service.IAccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Account)表服务实现类
 *
 * @author makejava
 * @since 2020-07-20 14:58:04
 */
@Service("accountService")
public class AccountServiceImpl implements IAccountService {
    @Resource
    private AccountMapper accountMapper;

    /**
     * 新增数据
     *
     * @param account 实例对象
     * @return 实例对象
     */
    @Override
    public Account insert(Account account) {
        this.accountMapper.insert(account);
        return account;
    }

    @Override
    public int update() {
        return this.accountMapper.update();
    }

    @Override
    public Account selectMaster() {
        Account a = accountMapper.selectMaster();
        return a;
    }

    @Override
    public Account selectSalve() {
        Account a = accountMapper.selectSalve();
        return a;
    }
}
